﻿<local:DocumentBase x:Class="WPFExcelReport.GSAB50"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                    xmlns:fd="clr-namespace:Labs.Filtering;assembly=ReflectionStudio.Core"
                    xmlns:wep="clr-namespace:WPFExcelReport"
                    Height="700" Width="1024" 
                    Title="染纱明细表"  
     >
    <Grid DataContext="" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
        <Grid.RowDefinitions>
            <RowDefinition Height="40"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
        </Grid.RowDefinitions>
        <WrapPanel Grid.Row="0">
            <Button Content="查询" Height="25" HorizontalAlignment="Left" Margin="11,17,0,0" Name="btnQuery"
                        Click ="btnQuery_Click" VerticalAlignment="Top" Width="106" />
            <Button Content="产生报表" Height="25" HorizontalAlignment="Left" Margin="11,17,0,0" Name="btnReport"
                        Click ="btnReport_Click" VerticalAlignment="Top" Width="106" />
        </WrapPanel>
        <fd:FilteringDataGrid Grid.Row="1"
            AutoGenerateColumns="False" EnableRowVirtualization="True"  
                                             ItemsSource="{Binding Path=ABPOS}"
                                              x:Name="MasterData" 
                                                 CanUserReorderColumns="True"  
                                             CanUserResizeRows="True"
                                              CanUserSortColumns="True"
                                              IsFilteringCaseSensitive="False" 
                                              RowDetailsVisibilityMode="VisibleWhenSelected"   
                                              Width="1000"
                                              Height="600"
                                              EnableColumnVirtualization="True"  
                                              ScrollViewer.HorizontalScrollBarVisibility="Auto"
                                              ScrollViewer.VerticalScrollBarVisibility="Auto"
                                              SelectionChanged="ItemsControls_SelectionChanged"
                                              >
            <DataGrid.Columns>
                <!--ABPAUFKRS;ABPAUFLFD;ABPAUFPOS;ABPART;ABPVAR;FACTORY;COLOR;ABPFARBE;QUANTITY;ABPSTARTDAT;ABPENDDAT;ACTENDDATE;-->
                <!--单前缀	单号	单行	品种编号	变量	外加工厂	颜色	色号	数量(KG)	下单日期	计划回货日期	实际回货日期-->
                <DataGridTextColumn Binding="{Binding Path=ABPAUFKRS}" Header="生" Width="SizeToCells" MinWidth="40" />
                <DataGridTextColumn Binding="{Binding Path=ABPAUFLFD}" Header="产" Width="SizeToCells"  MinWidth="40" />
                <DataGridTextColumn Binding="{Binding Path=ABPAUFPOS}" Header="单" Width="SizeToCells"  MinWidth="40" />
                <DataGridTextColumn Binding="{Binding Path=ABPART}" Header="品种" Width="SizeToCells" MinWidth="40" />
                <DataGridTextColumn Binding="{Binding Path=ABPVAR}" Header="版本" Width="SizeToCells" MinWidth="40" />
                <DataGridTextColumn Binding="{Binding Path=FACTORY}" Header="外加工厂" Width="SizeToCells" MinWidth="40" />
                <DataGridTextColumn Binding="{Binding Path=COLOR}" Header="颜色" Width="SizeToCells" MinWidth="40" />
                <DataGridTextColumn Binding="{Binding Path=ABPFARBE}" Header="色号" Width="SizeToCells" MinWidth="40" />
                <DataGridTextColumn Binding="{Binding Path=QUANTITY}" Header="数量kg" Width="SizeToCells" MinWidth="40" />
                <DataGridTextColumn Binding="{Binding Path=ABPSTARTDAT}" Header="下单日期" Width="SizeToCells" MinWidth="40" />
                <DataGridTextColumn Binding="{Binding Path=ABPENDDAT}" Header="计划回货日期" Width="SizeToCells" MinWidth="40" />
                <DataGridTextColumn Binding="{Binding Path=ACTENDDATE}" Header="实际回货日期" Width="SizeToCells" MinWidth="40" />
            </DataGrid.Columns>
        </fd:FilteringDataGrid>
    </Grid>
</local:DocumentBase >

